﻿<%@ Page Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="TaskAcceptDispatch.aspx.cs" Inherits="TaskAcceptDispatch" Title="Untitled Page" %>
<%@ Register Src="../Controls/TabsMenu/TabsMenu.ascx" TagName="TabsMenu" TagPrefix="uc1" %>
<%@ Register src="TaskPersonItem.ascx" tagname="TaskPersonItem" tagprefix="uc1" %> 
<%@ Register src="../Controls/TipMessage/TipMessage.ascx" tagname="TipMessage" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
                任务单号：
                </td>
                <td>
                <asp:TextBox ID="S_TaskCode" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                客户：
                </td>
                <td>
                <asp:TextBox ID="S_Guest" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                电话：
                </td>
                <td>
                <asp:TextBox ID="S_Phone" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                处理状态：
                </td>
                <td><div class="select"><div><ofcc:DropDownList ID="S_TaskState" runat="server">
                            <asp:ListItem Value="0">受理中</asp:ListItem>
                            <asp:ListItem Value="1">已派发</asp:ListItem>
                          </ofcc:DropDownList>
                          </div></div>
                </td>
                <td>
                    &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text=" 查询 "  CssClass="searchButton" />
                </td>
            </tr>
            </table>
     </div>
<div class="webPanelBorder" >
    <div class="webPanelCaption">受理报修</div>
    <div class="webPanelContent">
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridView_RowDataBound" 
            onsplitpageindexchange="gridView_SplitPageIndexChange">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input id="TaskID" checked="checked" name="TaskID" type="radio" 
                            value='<%#DataBinder.Eval(Container.DataItem,"TaskItemID")%>' />
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:BoundField DataField="TaskCode" HeaderText="任务单号" />
                <asp:BoundField DataField="SNTask" HeaderText="任务类型" />
                <asp:BoundField DataField="GroupName" HeaderText="部门组别" />
                <asp:BoundField DataField="Guest" HeaderText="客户" />
                <asp:BoundField DataField="Phone" HeaderText="电话" />
                <asp:BoundField DataField="Location" HeaderText="地点" />                
                <asp:BoundField DataField="Username" HeaderText="受理人" /> 
                <asp:BoundField DataField="CreateDate" HeaderText="受理时间" DataFormatString="{0:d}" HtmlEncode="false" />
                <asp:BoundField DataField="TaskState" HeaderText="处理状态" />
                <asp:BoundField DataField="ReqStatus" HeaderText="库房状态" />
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="linkButton" >任务受理</ofcc:LinkButton>    
    <ofcc:LinkButton ID="btnEdit" runat="server" OnClick="btnEdit_Click" CssClass="linkButton" >任务派发</ofcc:LinkButton>
    <ofcc:LinkButton ID="LinkButton2" runat="server" OnClick="btnListDocument_Click" CssClass="linkButton" >导出</ofcc:LinkButton> 
    <ofcc:LinkButton ID="btnRemove" runat="server"  ConfirmMessage="确定要作废吗?" OnClick="btnRemove_Click" CssClass="linkButton" >作废</ofcc:LinkButton>
</div>
</asp:Panel>


<asp:Panel ID="pnlEdit" runat="server" Width="95%" Visible="false" CssClass="centerPanel">
<uc1:TipMessage ID="tipMessage1" runat="server" style="width:95%;" />
<uc1:TabsMenu ID="tabsMenu" runat="server" OnPreRender="btnPreTabsMenu_Click"/>
   <asp:Panel ID="pnlTaskInfo" runat="server">
        <div class="webPanelBorder" >
        <div class="webPanelCaption">基本信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">单位/用户：
                    </td>
                    <td><asp:TextBox ID="tbGuest" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField1" runat="server" />
                    </td>                    
                </tr>
                <tr> 
                    <td class="tableSubjectWidth">联系电话：
                    </td>
                    <td><asp:TextBox ID="tbPhone" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField2" runat="server" />
                    </td>
                </tr>
                <tr> 
                    <td>地点信息：
                    </td>
                    <td ><asp:TextBox ID="tbLocation" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField3" runat="server" />
                    </td>
                </tr>                
                <tr>
                    <td>事由(要求)：</td>
                    <td><asp:TextBox ID="tbTroubleDescription" runat="server" CssClass="shortInput" Rows="5" MaxLength="40" TextMode="MultiLine"></asp:TextBox>
                    <br />
                    受理人：<asp:Label ID="lbUserID" runat="server" Text=""></asp:Label>&nbsp;
                    经办部门：<asp:Label ID="lbOrgID" runat="server" Text=""></asp:Label>&nbsp;
                    受理时间：<asp:Label ID="lbCreateDate" runat="server" Text=""></asp:Label>                    
                    </td>
                </tr> 
                <tr> 
                    <td>是否领取物料：
                    </td>
                    <td ><asp:CheckBox ID="cbIsReqGood" runat="server"></asp:CheckBox>
                    </td>
                </tr>  
                </table>  
        </div>
        </div>
   </asp:Panel>  
   <asp:Panel ID="pnlTaskPerson" runat="server">
        <uc1:TaskPersonItem ID="TaskPersonItem" runat="server" /> 
    </asp:Panel>
    <div class="webPanelButtonArea">
        <span class="linkButtonOut" id="btnSelect" style="display:none"><asp:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" CssClass="linkButton" >选择</asp:LinkButton></span>
        <span class="linkButtonOut" id="btnSave" style="display:none"><asp:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">保存</asp:LinkButton></span>
        <span class="linkButtonOut"><asp:LinkButton ID="btnDocument" runat="server" OnClick="btnDocument_Click" CssClass="linkButton" ValidationGroup="submit">导出</asp:LinkButton></span>
        <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">取消</ofcc:LinkButton>
    </div>
</asp:Panel>


<asp:HiddenField ID="hfAddOrEdit" runat="server" />
    
<asp:HiddenField ID="hfTaskID" runat="server" /> 
<asp:HiddenField ID="hfHasDispatch" runat="server" /> 

<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbGuest"
    Display="None" ErrorMessage="请选输入单位/用户" ValidationGroup="submit"></asp:RequiredFieldValidator>    
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbPhone"
    Display="None" ErrorMessage="请选输入联系电话" ValidationGroup="submit"></asp:RequiredFieldValidator>  
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbLocation"
    Display="None" ErrorMessage="请选输入地点信息" ValidationGroup="submit"></asp:RequiredFieldValidator>  
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbTroubleDescription"
    Display="None" ErrorMessage="请选输入事由(要求)" ValidationGroup="submit"></asp:RequiredFieldValidator>  
<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />
</asp:Content>

